#include<stdio.h>
void space (char *p)
{
	int count=0;
	char  *t;int k=0;
	while(*p!='\0')
	{
		if(*p==' ')
		{
			t=p;
			while(*t==' ')
			{
				t++;
			}
			*p=*t;
			count++;
		}
		else
		{
		k++;
		p++;
	}
		if(count==k)
		{
			break;
		}
	}
}
int main()
{
	char s[99];
	gets(s);
	space(s);
	puts(s);
	return 0;
}
